﻿using System;
using System.ComponentModel;

namespace Batman.Cms.Core.Utils
{
    public class EnumUtil
    {
        public static string GetDisplayName(Enum enu)
        {
            DisplayNameAttribute attribute = enu.GetAttribute<DisplayNameAttribute>();

            return attribute == null ? null : attribute.DisplayName;
        }
    }
}
